package rtm.core;

import java.io.IOException;
import java.io.InputStream;

import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParserFactory;

import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;

public class Parser {

	private final SAXParserFactory factory;
	
	public Parser() {
	
		factory = SAXParserFactory.newInstance();
		factory.setValidating(false);
	}
	
	
	public void parse(InputStream content, DefaultHandler handler) throws SAXException, IOException, ParserConfigurationException {

		// Create the builder and parse the file
		factory.newSAXParser().parse(content, handler);
	}
}
